package main

import (
	"github.com/gin-gonic/gin"
	"time"
	"tyy_linux_system/handlers"
)

// 定时器
func runEvery10Seconds(f func()) {
	ticker := time.NewTicker(10 * time.Second)
	defer ticker.Stop()
	for range ticker.C {
		f()
	}
}

func main() {
	//go runEvery10Seconds(file.FileTmpFunc)
	//go runEvery10Seconds(file.FileTmpFunc2)
	//go runEvery10Seconds(file.FileTmpFunc3)
	//go runEvery10Seconds(file.FileTmpFunc4)
	//go runEvery10Seconds(file.FileTmpFunc5)
	r := gin.Default()
	r.GET("/refuceconnectfromlist", handlers.GetRefuceConnectFromList())
	r.Run(":8080")
}
